<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="All Rights Reserved, Copyright (C) 2013, Wuyeguo, Ltd." />
<title>EasyUI Web Admin Power by Wuyeguo</title>
<link rel="stylesheet" type="text/css" href="../easyui/1.5.3/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../css/wu.css" />
<link rel="stylesheet" type="text/css" href="../css/icon.css" />
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../js/jquery.serializejson.min.js"></script>

</head>
	<body>	 
		    <div class="easyui-layout" data-options="region:'center',fit:true">
		        <div data-options="region:'east',title:'East'" style="width:400px">
		            <table id="tt" style="height:540px"></table>
		        </div>
		        <div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'" style="padding:10px" id="content">
		        	
		        	
		        </div>
		    </div>
	</body>
	<script type="text/javascript">
		$('#tt').datagrid({
		    url:'http://localhost:3000/news/list',
		    method:'post',
		    pagination:true,
		    pageList:[2,4,6,8,10],
		    pageSize:2,
		    columns:[[
		        {field:'title',title:'标题',width:100},
		        {field:'author',title:'作者',width:100},
		        {field:'date',title:'时间',width:200,align:'right'}
		    ]],
		    onClickRow:function(index,field,value){
	        	var node = $('#tt').datagrid('getSelected');
	        	console.log(node.content)
	        	$("#content").html(node.content)
	        }
		});
		
		
		
//		var currTab =  self.parent.$('#tabs').tabs('getSelected'); //获得当前tab
//	    var url = $(currTab.panel('options').content).attr('src');
//	    self.parent.$('#tabs').tabs('update', {
//		      tab : currTab,
//		      options : {
//		       content : createFrame(url)
//		      }
//	     });

	</script>
</html>
